Build, test, and submit your app using Xcode, Apple's integrated development environment.

Posts under Xcode tag

201 Posts

Post

Replies

Boosts

Views

Activity

Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
0
0
9.1k
May ’24
DeclaredAgeRange framework new cases and properties cause runtime crash with missing symbol
I'm making a wrapper library to abstract away some of the 'missing platform support' of DeclaredAgeRange until hopefully it expands to additional platforms. When I'm trying to fully enumerate all of the cases of AgeRangeDeclaration, which they all state available starting 26.0 (mysteriously added in Xcode 26.2 beta), the app crashes due to a missing symbol at launch time. This happens both for Xcode 26.1, 26.2 beta 2, and matching Xcode Cloud builds. So I've isolated it beyond "doesn't work on my machine". I just made a handful of crashes and attached a sysdiagnose to a fresh feedback. FB21121092 - DeclaredAgeRange: Eligibility property and new declaration cases unavailable on iOS 26.1 device contradicting documentation - causes runtime symbol not found crash If anyone is curious what these crashes look like I've attached the DiagnosticPayload.jsonRepresentation() generated from one of my favorite frameworks, MetricKit. Very clearly articulated in the diagnostic metadata you can see the symbol not found. "diagnosticMetaData" : { "platformArchitecture" : "arm64e", "terminationReason" : "Symbol not found: _$s16DeclaredAgeRange0bC7ServiceV0bC11DeclarationO14paymentCheckedyA2EmFWC\nReferenced from: <1894EDCB-3263-3604-8938-97D465FF3720> \/Volumes\/VOLUME\/*\/PerformanceOrganizer.app\/PerformanceOrganizer\nExpected in: <B8FD2C23-0CC9-3D94-902D-875900307A7A> \/System\/Library\/Frameworks\/DeclaredAgeRange.framework\/DeclaredAgeRange", "exceptionType" : 10, "appBuildVersion" : "745", "isTestFlightApp" : true, "osVersion" : "iPhone OS 26.1 (23B85)", "bundleIdentifier" : "dev.twincitiesapp.performanceorganizer", "deviceType" : "iPhone18,1", "exceptionCode" : 0, "signal" : 6, "regionFormat" : "US", "appVersion" : "2.0.0", "pid" : 22987, "lowPowerModeEnabled" : false } DiagnosticPayload.json This is the offending code in a type I control and make available on other platforms but leave unused. extension AgeRangeDeclaration { // A factory or initializer that takes the AgeRangeService.AgeRangeDeclaration and maps to the common AgeRangeDeclaration type public init?(platform value: AgeRangeService.AgeRangeDeclaration?) { guard let value else { return nil } switch value { // Xcode 26.1 visible cases case .selfDeclared: self = .selfDeclared case .guardianDeclared: self = .guardianDeclared // Xcode 26.2 visible cases // This is the first culprit, all of the following symbols would crash, this is just the first case .checkedByOtherMethod: self = .checkedByOtherMethod case .guardianCheckedByOtherMethod: self = .guardianCheckedByOtherMethod case .governmentIDChecked: self = .governmentIDChecked case .guardianGovernmentIDChecked: self = .guardianGovernmentIDChecked case .paymentChecked: self = .paymentChecked case .guardianPaymentChecked: self = .guardianPaymentChecked @unknown default: // Apple added new cases in Xcode 26.2 betas that were available in iOS 26.0, // so it is probable that this could happen again. If it does, assert to let developers // bring it to my attention. assertionFailure("Invalid or out of date knowledge of age range declaration \(value)") self = .unknown } } } For what it is worth, the same is also true for isEligibleForAgeFeatures which I suspect was also added to Xcode 26.2 somehow but not made available to real devices running [26.0 - 26.2). As a side note, thank you for this property, it will let me check what states I need to perform extra checks for in a clean way, I just will need it to now not crash my app on 26.0 and 26.1 runtime devices. :) Edit: DTS did confirm on a comment I had in another thread that this is a bug. Now just to wait for an Xcode beta update. https://developer.apple.com/forums/thread/807906?answerId=867205022#867205022 In any case, this is a great example of how MetricKit totally rocks capturing things other off the shelf crash tools might not have a chance to get. I did have to roll back my TestFlight to an earlier build, but MetricKit was there to send me the previous crashes as soon as the app could launch. Thanks MetricKit team!
0
0
58
22h
Xcode 26.1 / OS 26.1 regression with schema and macros
After Xcode 26.1 was updated and installing the OS 26.1 simulators, my app started crashing related to transformable properties. When I checked my schema, I noticed that properties with array collection types are suddenly set with an option transformable with Optional("NSSecureUnarchiveFromData")], even though I do not use any transformable types. I verified the macros, no transformable was specified. This is causing ModelCoders to encode/decode my properties incorrectly. This is not an issue when I switch back to OS 26.0 simulators.
3
0
153
1d
Xcode Cloud, Bitbucket
Hello, While setting up Xcode Cloud using Bitbucket, I encountered an issue with Source Control and providing access to the repository. The problem most likely stems from the fact that Bitbucket has updated its policy, and the use of app passwords is no longer available (at least for new ones). However, in Xcode → Settings → Source Control, the login flow still requires an app password, which makes it impossible to authenticate using the new API tokens. Attempting to authenticate via SSH also does not resolve the issue. After connecting to GitHub, I also tried to connect through the web version, but I'm getting the same message: "Bitbucket Cloud installation was incomplete." I received this same message when I first tried to connect through Xcode. This problem does not occur when connecting to GitHub. I would appreciate receiving feedback from the Apple team on this issue. System Info: Xcode: 16.2 (latest from App Store) macOS: Sequoia 15.1
1
0
88
1d
Assets duplicating on Xcode 26.1 Beta 3
I've recently installed 26.1 Beta 3 alongside stable 26.0.1 When building my app with 26.0.1 the final .ipa size is ~17mb, however after building my app with 26.1 Beta 3 the size has increased up to ~22mb The main difference is Assets.car blowing from 1.1mb to 5.6mb (or 8.6mb if I include all icons settings). Upon examining I've found new liquid glass .icon file duplicating itself multiple times as png variants (any, dark, tinted, etc). Is anyone else experiencing this issue?
6
1
317
1d
LLDB and environment variables in Xcode
Hey! I am writing type formatting scripts in Python for lldb, as described in https://lldb.llvm.org/use/variable.html#python-scripting. I'm trying to pass an environment variable to lldb from Xcode to determine the path to the scripts in the project root, so the project is not bound to some predetermined path. I am having trouble doing this in Xcode. What I have tried: lldbinit file Create a .lldbinit file in $(SRCROOT) with the following content: platform shell echo $SRCROOT. Set the path to the .lldbinit file in Edit Scheme... > Info > LLDB Init File ($(SRCROOT)/.lldbinit). Set the SRCROOT environment variable to $(SRCROOT) in Edit Scheme... > Arguments > Environment Variables. entry-point breakpoint Add a breakpoint to the entry-point of the application. Set the Automatically continue after evaluating actions option. Add the action platform shell $(SRCROOT) or platform shell $SRCROOT. Set the SRCROOT environment variable to $(SRCROOT) in Edit Scheme... > Arguments > Environment Variables. What I expect to happen: The first line of the debug console is a path pointing to $(SRCROOT) What actually happens: No path is output Is this functionality available in Xcode Version 26.0.1 (17A400)? Thanks in advance, Barnabas
3
0
151
1d
Mac Catalyst: AUv3 Extension no longer works on MacOS, still works on iOS
I have a Catalyst app ('container') which hosts an embedded AUv3 Audio Unit extension ('plugin'). This used to work for years and has worked with this project until a few days ago. it still works on iOS as expected on MacOS the extension is never registered/installed and won't load extension won't show up with AUVal seems to have stopped working with the 26.1 XCode update I'm fairly certain the problem is not code related (i.e. likely build settings, project settings, entitlements, signing, etc.) I have compared all settings with another still-working project and can't find any meaningful difference (I can't request code-level support because even the minimal thing vastly exceeds the 250 lines of code limit.) How can I debug the issue? I literally don't know where to start to fix this problem, short of rebuilding the entire thing and hope that it magically starts working again.
0
0
97
1d
“iOS 26 + BGContinuedProcessingTask: Why does a CPU/ML-intensive job run 4-5× slower in background?”
Hello All, I’m a mobile-app developer working with iOS 26+ and I’m using BGContinuedProcessingTask to perform background work. My app’s workflow includes the following business logic: Loading images via PHImageRequest. Using a CLIP model to extract image embeddings. Using an .mlmodel-based model to further process those embeddings. For both model inferences I set computeUnits = .cpuAndNeuralEngine. When the app is moved to the background, I observe that the same workload(all three workload) becomes on average 4-5× slower than when the app is in the foreground. In an attempt to diagnose the slowdown, I tried to profile with Xcode Instruments, but since a debugger was attached, the performance in background appeared nearly identical to foreground. Even when I detached the debugger, the measured system resource metrics (process CPU usage, system CPU usage, memory, QoS class, thermal state) showed no meaningful difference. Below are some of the metrics I captured: Process CPU: 177% (Foreground) → 153% (Background) → ~-24.1% Still >1.5 cores of work. System CPU: 56.1% → 38.4% → ~-17.7% Process Memory: 244.8 MB → 218.1 MB QoS Class: userInitiated in both cases Thermal State: nominal in both cases Given these results, I’m finding it hard to pinpoint why the overall latency is so much worse when the app is backgrounded, even though the obvious metrics show little variation. I suspect the cause may involve P-core vs E-core scheduling, or internal hardware throttling/limit of Neural Engine usage, but I cannot find clear documentation or logging to confirm this. My question is: Does anyone know why a CPU (and Neural Engine)-intensive job like this would slow down so dramatically when using BGContinuedProcessingTask in the background on iOS 26+, despite apparent similar resource-usage metrics? Are there internal iOS scheduling/hardware-allocation behaviors (e.g., falling back to lower-performing cores when backgrounded) that might explain this? Any pointers to Apple technical notes, system logs, or instrumentation I might use to detect which cores or compute units are being used would be greatly appreciated. Thank you for your time and any guidance you can provide. Best regards,
1
0
44
2d
When xcode is tried again, it always fails to install the app
When xcode is installed on a mobile phone, the first run always fails. The second run usually works normally.The certificate signatures have been checked and all are normal。This problem will also occur if you stop the running xcode and then run it again。please help me. Mac mini:Apple M2 Pro mas os 15.2 (24C101) Xcode: Version 16.2 (16C5032a) The first failed print is as follows: 无法安装“xxx” Domain: IXUserPresentableErrorDomain Code: 14 Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.uRA3Gt/extracted/Payload/xxx.app : 0xe8008001 (An unknown error has occurred.) User Info: { DVTErrorCreationDateKey = "2025-11-20 02:50:17 +0000"; IDERunOperationFailingWorker = IDEInstallCoreDeviceWorker; } Failed to install the app on the device. Domain: com.apple.dt.CoreDeviceError Code: 3002 User Info: { NSURL = "file:///Users/shenchunxing/Library/Developer/Xcode/DerivedData/VideoGo-dwhfrhswidapcydbmfuamplrtvso/Build/Products/Debug-iphoneos/xxx.app"; } 无法安装“xxx” Domain: IXUserPresentableErrorDomain Code: 14 Failure Reason: 无法安装此App,因为无法验证其完整性。 Recovery Suggestion: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.uRA3Gt/extracted/Payload/xxx.app : 0xe8008001 (An unknown error has occurred.) Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.uRA3Gt/extracted/Payload/xxx.app : 0xe8008001 (An unknown error has occurred.) Domain: MIInstallerErrorDomain Code: 13 User Info: { FunctionName = "+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]"; LegacyErrorString = ApplicationVerificationFailed; LibMISErrorNumber = "-402620415"; SourceFileLine = 79; } Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "00008120-0009758221C2201E"; "device_isCoreDevice" = 1; "device_model" = "iPhone15,4"; "device_osBuild" = "18.2 (22C152)"; "device_platform" = "com.apple.platform.iphoneos"; "device_thinningType" = "iPhone15,4"; "dvt_coredevice_version" = "397.28"; "dvt_coresimulator_version" = "993.7"; "dvt_mobiledevice_version" = "1759.60.7"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 13228; "operation_errorCode" = 14; "operation_errorDomain" = IXUserPresentableErrorDomain; "operation_errorWorker" = IDEInstallCoreDeviceWorker; "operation_name" = IDERunOperationWorkerGroup; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_113575882_enable" = 0; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_checker_tpc_enable" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_guardMalloc_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_mtc_enable" = 1; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "param_diag_sanitizer_asan_enable" = 0; "param_diag_sanitizer_tsan_enable" = 0; "param_diag_sanitizer_tsan_stopOnIssue" = 0; "param_diag_sanitizer_ubsan_enable" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "param_launcher_substyle" = 0; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_structuredConsoleMode" = 1; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos18.2"; "sdk_osVersion" = "18.2"; "sdk_variant" = iphoneos; }
1
0
81
2d
Can new Xcode build unsupported deployment target IPA?
In the official explanation, "deployment targets" refers to "the OS range supported by this version of Xcode for uploading apps to App Store Connect." On the Xcode Support page (https://developer.apple.com/support/xcode/), I can find the deployment targets supported by each Xcode version. My question is: can I use a newer version of Xcode to build an IPA with an older deployment target that isn’t listed? For example, can I use Xcode 26 to build an iOS 12 IPA (just build, not debug)? In my opinion, since the new SDKs still contain many old macros restricted to earlier iOS versions, it should be possible, but I’m not sure if that’s correct. Thanks.
1
0
43
2d
Xcode seems not compatible with the ssh key RSA-SHA2 while trying to git clone from Azure
Since a few days, I'm trying to fetch our private SPM repo hosted on Azure via Xcode but without success. Actually they now accept only ssh key RSA-SHA2-256 or RSA-SHA2-512. So I created a new SSH key, but it seems the problem persists when I try to fetch spm repo or git clone via xcode: "You’re using ssh-rsa that is about to be deprecated and your request has been blocked intentionally. Any SSH session using SSH-RSA is subject to brown out (failure during random time periods). Please use rsa-sha2-256 or rsa-sha2-512 instead. For more details see aka.ms/ado-ssh-rsa-deprecation. remote: ERROR_SSH_UNSUPPORTED_CIPHER (7) (-20)" Even so I'm choosing the good new ssh key, it seems Xcode is sending wrong information about the new generated ssh key. Anyone is experiencing the same here?
12
5
1k
2d
Xcode Organizer is blowing up
An error occurred preventing Xcode from downloading version information from App Store Connect for account "xxxxxxxx". An unexpected error occurred: [<__NSDictionaryM 0x600003ed4fe0> valueForUndefinedKey:]: this class is not key value coding-compliant for the <app name! 5.00.12 (iOS App). I have no idea what the hell is causing this. I have checked all of the links between screens and objects and none are missing. This is a live active version on the store.
0
0
37
3d
Unable to find identity (but have private key and certificate)
I'm unable to sign the an example application using xcode and "automatically manage signing". The error I'm getting is: CodeSign [...] (in target 'foobar' from project 'foobar') Signing Identity: "Apple Development: [xxxx] " /usr/bin/codesign --force --sign 4ABB258102FF656E9F597546A49274C28D2B8B3E -o runtime --timestamp\=none --generate-entitlement-der [filename] 4ABB258102FF656E9F597546A49274C28D2B8B3E: no identity found Command CodeSign failed with a nonzero exit code However, I am able to see a certificate and a private identity on my keychain: % security find-certificate -aZ | grep -i 4ABB258102FF656E9F597546A49274C28D2B8B3E SHA-1 hash: 4ABB258102FF656E9F597546A49274C28D2B8B3E and % security find-key -s | grep -q 'Apple Development' && echo YES YES what is puzzling is that security does not find an identity: % security find-identity -p codesigning Policy: Code Signing Matching identities 0 identities found Valid identities only 0 valid identities found but XCode claims that everything is working fine. Anybody knows what might I be missing? I tried logging out, requesting new certificates, rebooting, moving them to another keychain, and asking to developer friends.
6
0
612
3d
Xcode and Reading documents from a URL connection.
I have an Xcode app where currently txt files in the project display text data as a list. I can search through the lists and have buttons that will swap between different lists of information that you can look through. The next task is I have URL connections to docx files on a SharePoint site. I am trying to use an URLsession function to connect to the URL links to download the documents to the document directory then have the application read the doc information to then be displayed as the txt info would. The idea is that the docx files are a type of online update version of the data. So when the app is used and on wifi, the app can update the list data with the docx files. I have code set up that should access the URL files but I am struggling to figure out how to read the data and access from this Documents directory. I have been looking online and so far I am at a loss on where to go here. If anyone can help or provide some insight I would greatly appreciate it. I can try and provide code samples to help explain things if that is needed.
3
0
86
3d